static bool __initdata acpi_skip_timer_override;
boolean_param("acpi_skip_timer_override", acpi_skip_timer_override);
+static uint8_t __initdata madt_revision;
+
static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
/* --------------------------------------------------------------------------
struct acpi_table_madt *madt =
container_of(table, struct acpi_table_madt, header);
+ madt_revision = madt->header.revision;
+
if (madt->address) {
acpi_lapic_addr = (u64) madt->address;
if (BAD_MADT_ENTRY(processor, end))
return -EINVAL;
+ /* Don't register processors that cannot be onlined. */
+ if (madt_revision >= 5 &&
+ !(processor->lapic_flags & ACPI_MADT_ENABLED) &&
+ !(processor->lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
+ return 0;
+
if ((processor->lapic_flags & ACPI_MADT_ENABLED) ||
processor->local_apic_id != 0xffffffff || opt_cpu_info) {
acpi_table_print_madt_entry(header);
if (BAD_MADT_ENTRY(processor, end))
return -EINVAL;
+ /* Don't register processors that cannot be onlined. */
+ if (madt_revision >= 5 &&
+ !(processor->lapic_flags & ACPI_MADT_ENABLED) &&
+ !(processor->lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
+ return 0;
+
if ((processor->lapic_flags & ACPI_MADT_ENABLED) ||
processor->id != 0xff || opt_cpu_info)
acpi_table_print_madt_entry(header);
/* MADT Local APIC flags */
-#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
+#define ACPI_MADT_ENABLED (1 << 0) /* 00: Processor is usable if set */
+#define ACPI_MADT_ONLINE_CAPABLE (1 << 1) /* 01: Processor can be onlined */
/* MADT MPS INTI flags (inti_flags) */